package com.woniu.atms.config;

//import com.woniu.atms.shiro.DbRealm;

//import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
//
//import org.apache.shiro.realm.Realm;
//import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.*;

/**
 * @author 张奇
 * @title: ShiroConfig
 * @projectName wn_sb_rbac12-21
 * @description: TODO
 * @date 2022/1/8 10:53
 */
//@Configuration
public class ShiroConfig {
//
//
//    @Bean
//    public Realm realm() {
//        HashedCredentialsMatcher credentialsMatcher=new HashedCredentialsMatcher();
//        credentialsMatcher.setHashIterations(1024);
//        credentialsMatcher.setHashAlgorithmName("md5");
//        DbRealm realm=new DbRealm();
//        realm.setCredentialsMatcher(credentialsMatcher);
//        return realm;
//    }
//
//
//    @Bean
//    public DefaultWebSecurityManager securityManager(){
//        DefaultWebSecurityManager defaultWebSecurityManager=new DefaultWebSecurityManager();
//        defaultWebSecurityManager.setRealms(Arrays.asList(realm()));
//
//        return defaultWebSecurityManager;
//    }



}
